package com.yupi.springbootinit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yupi.springbootinit.model.entity.ProcessSheetStep;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

/**
 * 工艺单明细（工序路线）Mapper
 */
public interface ProcessSheetStepMapper extends BaseMapper<ProcessSheetStep> {
    
    /**
     * 物理删除指定工艺单的所有步骤
     * @param processSheetId 工艺单ID
     * @return 删除的记录数
     */
    @Delete("DELETE FROM process_sheet_step WHERE process_sheet_id = #{processSheetId}")
    int physicalDeleteByProcessSheetId(@Param("processSheetId") Long processSheetId);
}